Skip to content

website/docs: document npm install-script blocking#22461

Merged
dewi-tik merged 3 commits into
mainfrom
docs/contributing-npm-script-blocking
May 21, 2026
Merged

website/docs: document npm install-script blocking#22461
dewi-tik merged 3 commits into
mainfrom
docs/contributing-npm-script-blocking

Conversation

@GirlBossRush
Copy link
Copy Markdown
Contributor

Summary

Adds an :::info admonition to both contributor setup guides explaining:

  • the repo's .npmrc sets ignore-scripts=true and why (neutralizes the dominant npm supply-chain attack class — "Shai-Hulud" / "Mini Shai-Hulud" payloads run from preinstall)
  • how to recover when a package's install script is legitimately required: npm rebuild --foreground-scripts esbuild chromedriver tree-sitter tree-sitter-json
  • the explicit "do not flip ignore-scripts off" guidance

Files touched:

  • website/docs/developer-docs/setup/full-dev-environment.mdx — admonition right after make install
  • website/docs/developer-docs/setup/frontend-dev-environment.md — admonition right after make node-install

This is docs-only — no code or config changes. The motivation is that the rationale for .npmrc is currently only present as an inline comment in .npmrc itself; a contributor whose esbuild build silently fails has no obvious next step except to disable the protection, which is exactly what we want to discourage.

Test plan

  • Docs build (make docs / website preview) passes
  • Both :::info admonitions render correctly
  • The shell snippets are accurate against current web/package.json / root deps

@GirlBossRush GirlBossRush requested a review from a team as a code owner May 19, 2026 11:32
@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 10ba6de
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a0ef5a3de94cc00082afeef
😎 Deploy Preview https://deploy-preview-22461--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.29%. Comparing base (c0d0bff) to head (10ba6de).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #22461   +/-   ##
=======================================
  Coverage   93.29%   93.29%           
=======================================
  Files        1032     1032           
  Lines       60062    60062           
  Branches      400      400           
=======================================
  Hits        56032    56032           
  Misses       4030     4030           
Flag Coverage Δ
conformance 36.61% <ø> (ø)
e2e 41.86% <ø> (+<0.01%) ⬆️
integration 33.05% <ø> (+<0.01%) ⬆️
rust 0.00% <ø> (ø)
unit 92.20% <ø> (+<0.01%) ⬆️
unit-migrate 92.25% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 10ba6de
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a0ef5a343767c000829cfd3
😎 Deploy Preview https://deploy-preview-22461--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@tanberry tanberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @GirlBossRush, this is very helpful. Especially the "do not turn off" explicitness.

@GirlBossRush GirlBossRush enabled auto-merge (squash) May 19, 2026 23:44
@GirlBossRush GirlBossRush force-pushed the docs/contributing-npm-script-blocking branch from 2fce6f1 to ee3db01 Compare May 21, 2026 01:01
@GirlBossRush GirlBossRush self-assigned this May 21, 2026
@GirlBossRush GirlBossRush added the area:docs Features or issues related to Docusaurus label May 21, 2026
GirlBossRush and others added 2 commits May 21, 2026 13:41
The repo's `.npmrc` sets `ignore-scripts=true` to neutralize the
dominant npm supply-chain attack pattern (preinstall/postinstall
payloads, as used by the recent "Shai-Hulud" and "Mini Shai-Hulud"
incidents). The trade-off is that a handful of packages that ship
native binaries — esbuild, chromedriver, tree-sitter — need to be
rebuilt explicitly when their install step is required.

Today this is implicit; a new contributor whose build fails because
esbuild's binary didn't unpack has no obvious next step except to
disable the protection. Documenting it in both setup guides points
them at `npm rebuild --foreground-scripts <pkg>` and makes the
"don't flip `ignore-scripts` off" guidance explicit.

No code or config changes — docs only.

Co-authored-by: Agent <279763771+playpen-agent@users.noreply.github.com>
@GirlBossRush GirlBossRush force-pushed the docs/contributing-npm-script-blocking branch from ee3db01 to 3715aaa Compare May 21, 2026 11:41
npm rebuild --foreground-scripts esbuild chromedriver tree-sitter tree-sitter-json
```

**Do not** edit `.npmrc` to flip `ignore-scripts` off — that re-introduces the risk repo-wide.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ehhhh I'd say people can do what they please on their local machines (if not corp owned, but considering as this is contribution docs, probably just extern) We have the file for a reason and I don't really see the need to outline the fact to not modify this one over others. Anyways, if any npm files are modified we'll see it when a pr is opened

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to mention it explicitly just in case some LLM tells them to do it as a quick fix. They can always ignore the note.

Copy link
Copy Markdown
Contributor

@dewi-tik dewi-tik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor suggestions otherwise all good

Comment thread website/docs/developer-docs/setup/_npm-install-scripts-admonition.mdx Outdated
Comment thread website/docs/developer-docs/setup/_npm-install-scripts-admonition.mdx Outdated
Comment thread website/docs/developer-docs/setup/_npm-install-scripts-admonition.mdx Outdated
Comment thread website/docs/developer-docs/setup/_npm-install-scripts-admonition.mdx Outdated
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core May 21, 2026
@dewi-tik dewi-tik disabled auto-merge May 21, 2026 12:07
Co-authored-by: Dewi Roberts <dewi@goauthentik.io>
Signed-off-by: Dewi Roberts <dewi@goauthentik.io>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-10ba6de2e5d071a85839df50cdf1d0a3b6fdff9e
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-10ba6de2e5d071a85839df50cdf1d0a3b6fdff9e

Afterwards, run the upgrade commands from the latest release notes.

@dewi-tik dewi-tik enabled auto-merge (squash) May 21, 2026 12:29
@dewi-tik dewi-tik merged commit 3537ea5 into main May 21, 2026
111 checks passed
@dewi-tik dewi-tik deleted the docs/contributing-npm-script-blocking branch May 21, 2026 12:47
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core May 21, 2026
kensternberg-authentik added a commit that referenced this pull request May 21, 2026
* main: (28 commits)
  events: fix certificate typo (#22542)
  website/release: Release notes updates (#22543)
  providers/saml: handle XML declarations in unified endpoint (#22455)
  web: bump @sentry/browser from 10.52.0 to 10.53.1 in /web in the sentry group across 1 directory (#22472)
  core: bump library/golang from 1.26.2-trixie to 1.26.3-trixie in /lifecycle/container (#22516)
  core: bump sentry-sdk from 2.59.0 to 2.60.0 (#22513)
  core: bump github.com/go-openapi/runtime from 0.29.5 to 0.30.0 (#22511)
  core: bump djangorestframework-stubs[compatible-mypy] from 3.16.9 to 3.17.0 (#22512)
  website/docs: release notes: add absorb lms to integrations (#22534)
  core: bump library/node from 24 to 26 in /lifecycle/container (#22517)
  website/docs: document npm install-script blocking (#22461)
  ci: add dependency-review workflow (#22464)
  root: bind-mount .npmrc into Dockerfile npm ci stages (#22462)
  website/docs: add global to values.yaml snippets and update version (#22524)
  website/integrations: add absorb LMS (#22328)
  core: bump astral-sh/uv from 0.11.5 to 0.11.15 in /lifecycle/container (#22515)
  core: bump library/nginx from 1.29-trixie to 1.31-trixie in /website (#22520)
  ci: bump codecov/codecov-action from 6.0.0 to 6.0.1 in /.github/actions/test-results (#22522)
  core: bump aws-cdk-lib from 2.253.1 to 2.254.0 (#22514)
  core: bump goauthentik/fips-python from 3.14.3-slim-trixie-fips to 3.14.5-slim-trixie-fips in /lifecycle/container (#22518)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Features or issues related to Docusaurus

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants